<!DOCTYPE html>
<html>
    <head>
        <title>$$$￥￥￥</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <script src="../node_modules/_vue@2.6.14@vue/dist/vue.min.js"></script>
    </head>
    <body>
         <div id="boc">
             <!-- 绑定事件用v-on -->
         
          <button v-on:click="fun()">点我打印</button>
          <button @click="fun()">点我打印</button>
            </div>
    </body>
</html>
<script>
  new Vue({
      data:{
         
      },
      el:"#boc",
      // methods来创建函数
      methods:{
          fun(){
            console.error("lalla");
          }
      }
  })
</script>